package com.carstop.model;

import java.util.List;

public class CityService {

	
		private CityDAO_interface dao;

		public CityService() {
			dao = new CityDAO();
		}

		public CityVO addArea(String city_id, String name,String province_id) {

			CityVO cityVO = new CityVO();

			cityVO.setCity_id(city_id);
			cityVO.setName(name);
			cityVO.setName(province_id);
			dao.insert(cityVO);

			return cityVO;
		}

		public CityVO updateEmp(String city_id, String name,String province_id) {

			CityVO cityVO = new CityVO();

			cityVO.setCity_id(city_id);
			cityVO.setName(name);
			cityVO.setName(province_id);
			dao.update(cityVO);

			return cityVO;
		}

		public void deleteEmp(String city_id) {
			dao.delete(city_id);
		}

		

		public List<CityVO> getAll() {
			return dao.getAll();
		}
	
}
